package com.mapper;

import com.model.User_Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface User_OrderMapper {

    @Insert("insert into user_order(userid,orderid) values(#{userid},#{orderid})")
    public boolean insertUser_Order(@Param("userid")Long UserId,@Param("orderid")Long OrderId);

    @Select("select * from user_order where userid=#{userid}")
    public List<User_Order> getUser_OrderByUserId(@Param("userid")Long UserId);
}
